/*
 * MenuUtama.java
 *
 * Created on 30 April 2009, 20:35
 */

package DigimonAdventure.UserInterface;

import DigimonAdventure.Database.DigimonSpecies;
import DigimonAdventure.DigimonAdventure;
import DigimonAdventure.MP3Player.MusicPlayer;

/**
 * @author  Kris Derril Siregar
 *          Benz Louis
 */
public class MenuUtama extends javax.swing.JFrame {
    private MusicPlayer bgm;
    /** Creates new form MenuUtama */
    public MenuUtama() {
        initComponents();
        GenderGroup.add(GenderF);
        GenderGroup.add(GenderM);
        DigimonGroup.add(Digi1);
        DigimonGroup.add(Digi2);
        DigimonGroup.add(Digi3);
        this.setLocationRelativeTo(null);
        bgm = new MusicPlayer("/DigimonAdventure/Sound/Main Menu.mp3");
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        DialogCredit = new javax.swing.JDialog(this);
        jPanel6 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        CmdBack = new javax.swing.JButton();
        DialogLoad = new javax.swing.JDialog(this);
        jPanel5 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        ComboProfile = new javax.swing.JComboBox();
        CmdOK = new javax.swing.JButton();
        CmdCancel = new javax.swing.JButton();
        DialogNew1 = new javax.swing.JDialog(this);
        jPanel1 = new javax.swing.JPanel();
        Nama = new javax.swing.JLabel();
        FieldName = new javax.swing.JTextField();
        CmdNext1 = new javax.swing.JButton();
        CmdCancel2 = new javax.swing.JButton();
        DialogNew2 = new javax.swing.JDialog(this);
        jPanel2 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        GenderM = new javax.swing.JRadioButton();
        GenderF = new javax.swing.JRadioButton();
        CmdNext2 = new javax.swing.JButton();
        DialogNew3 = new javax.swing.JDialog(this);
        jPanel3 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        Digi1 = new javax.swing.JRadioButton();
        Digi2 = new javax.swing.JRadioButton();
        Digi3 = new javax.swing.JRadioButton();
        CmdNext3 = new javax.swing.JButton();
        DialogNew4 = new javax.swing.JDialog(this);
        jPanel4 = new javax.swing.JPanel();
        CmdNext4 = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        GenderGroup = new javax.swing.ButtonGroup();
        DigimonGroup = new javax.swing.ButtonGroup();
        jLayeredPane1 = new javax.swing.JLayeredPane();
        BG = new javax.swing.JLabel();
        cmdCredit = new javax.swing.JButton();
        cmdNew = new javax.swing.JButton();
        cmdLoad = new javax.swing.JButton();

        DialogCredit.setTitle("Team Kyubi proudly presents...");
        DialogCredit.setMinimumSize(new java.awt.Dimension(500, 250));
        DialogCredit.setModal(true);
        DialogCredit.setResizable(false);

        jTextArea1.setColumns(20);
        jTextArea1.setEditable(false);
        jTextArea1.setRows(5);
        jTextArea1.setText("Created by Team Kyuubi:\n\tAditya Irfansyah\n\tEry Brahmaputra\n\tKris Derril Siregar\n\tDarryl\n\tBenz Louis\n");
        jScrollPane1.setViewportView(jTextArea1);

        CmdBack.setText("Back");
        CmdBack.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CmdBackMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 430, Short.MAX_VALUE)
                    .addComponent(CmdBack, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(CmdBack, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout DialogCreditLayout = new javax.swing.GroupLayout(DialogCredit.getContentPane());
        DialogCredit.getContentPane().setLayout(DialogCreditLayout);
        DialogCreditLayout.setHorizontalGroup(
            DialogCreditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        DialogCreditLayout.setVerticalGroup(
            DialogCreditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        DialogLoad.setTitle("Load Game");
        DialogLoad.setMinimumSize(new java.awt.Dimension(350, 150));
        DialogLoad.setModal(true);
        DialogLoad.setResizable(false);

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel6.setText("Select a profile to load:");

        ComboProfile.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "<Profile 1>", "<Profile 2>", "<Profile 3>", "<Profile 4>", "<Profile 5>" }));

        CmdOK.setText("OK");
        CmdOK.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CmdOKMouseClicked(evt);
            }
        });

        CmdCancel.setText("Cancel");
        CmdCancel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CmdCancelMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(ComboProfile, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel6))
                .addContainerGap(80, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(130, Short.MAX_VALUE)
                .addComponent(CmdCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(CmdOK, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(ComboProfile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CmdOK)
                    .addComponent(CmdCancel))
                .addContainerGap())
        );

        javax.swing.GroupLayout DialogLoadLayout = new javax.swing.GroupLayout(DialogLoad.getContentPane());
        DialogLoad.getContentPane().setLayout(DialogLoadLayout);
        DialogLoadLayout.setHorizontalGroup(
            DialogLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        DialogLoadLayout.setVerticalGroup(
            DialogLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        DialogNew1.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        DialogNew1.setTitle("Intro");
        DialogNew1.setAlwaysOnTop(true);
        DialogNew1.setMinimumSize(new java.awt.Dimension(500, 200));
        DialogNew1.setModal(true);
        DialogNew1.setResizable(false);

        jPanel1.setMinimumSize(new java.awt.Dimension(475, 150));

        Nama.setFont(new java.awt.Font("Tahoma", 0, 12));
        Nama.setText("Welcome to our World, oh Chosen One... Would you please tell us your name? ");

        FieldName.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        FieldName.setText("Gray");
        FieldName.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                FieldNameMouseClicked(evt);
            }
        });

        CmdNext1.setText("Next");
        CmdNext1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CmdNext1MouseClicked(evt);
            }
        });

        CmdCancel2.setText("Cancel");
        CmdCancel2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CmdCancel2MouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(FieldName, javax.swing.GroupLayout.PREFERRED_SIZE, 430, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(Nama, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addContainerGap(247, Short.MAX_VALUE)
                        .addComponent(CmdCancel2, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(CmdNext1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Nama, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(FieldName, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 42, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CmdNext1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CmdCancel2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout DialogNew1Layout = new javax.swing.GroupLayout(DialogNew1.getContentPane());
        DialogNew1.getContentPane().setLayout(DialogNew1Layout);
        DialogNew1Layout.setHorizontalGroup(
            DialogNew1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        DialogNew1Layout.setVerticalGroup(
            DialogNew1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        DialogNew2.setTitle("Intro");
        DialogNew2.setMinimumSize(new java.awt.Dimension(500, 200));
        DialogNew2.setModal(true);
        DialogNew2.setResizable(false);
        DialogNew2.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                DialogNew2ComponentShown(evt);
            }
        });

        jPanel2.setMinimumSize(new java.awt.Dimension(475, 150));

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel2.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jLabel2ComponentShown(evt);
            }
        });

        GenderM.setSelected(true);
        GenderM.setText("I prefer to be Masculine");
        GenderM.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                GenderMMouseClicked(evt);
            }
        });

        GenderF.setText("I prefer to be Feminine");
        GenderF.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                GenderFMouseClicked(evt);
            }
        });

        CmdNext2.setText("Next");
        CmdNext2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CmdNext2MouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE)
                    .addComponent(CmdNext2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(GenderF)
                            .addComponent(GenderM, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(GenderM, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(GenderF)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
                .addComponent(CmdNext2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout DialogNew2Layout = new javax.swing.GroupLayout(DialogNew2.getContentPane());
        DialogNew2.getContentPane().setLayout(DialogNew2Layout);
        DialogNew2Layout.setHorizontalGroup(
            DialogNew2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        DialogNew2Layout.setVerticalGroup(
            DialogNew2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        DialogNew3.setTitle("Intro");
        DialogNew3.setMinimumSize(new java.awt.Dimension(500, 200));
        DialogNew3.setModalityType(java.awt.Dialog.ModalityType.DOCUMENT_MODAL);
        DialogNew3.setResizable(false);

        jPanel3.setMinimumSize(new java.awt.Dimension(475, 150));

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel3.setText("Understood... Final question: Which of these do you consider the most important?");

        Digi1.setSelected(true);
        Digi1.setText("Vigilance and Bravery");
        Digi1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                Digi1MouseClicked(evt);
            }
        });

        Digi2.setText("Kindness and Benevolence");
        Digi2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                Digi2MouseClicked(evt);
            }
        });

        Digi3.setText("Wisdom and Virtue");
        Digi3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                Digi3MouseClicked(evt);
            }
        });

        CmdNext3.setText("Next");
        CmdNext3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CmdNext3MouseClicked(evt);
            }
        });
        CmdNext3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CmdNext3ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(Digi2, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(Digi1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(Digi3, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addComponent(CmdNext3, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(Digi1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(Digi2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)
                        .addComponent(CmdNext3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(Digi3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
        );

        javax.swing.GroupLayout DialogNew3Layout = new javax.swing.GroupLayout(DialogNew3.getContentPane());
        DialogNew3.getContentPane().setLayout(DialogNew3Layout);
        DialogNew3Layout.setHorizontalGroup(
            DialogNew3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        DialogNew3Layout.setVerticalGroup(
            DialogNew3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        DialogNew4.setTitle("Get ready..!");
        DialogNew4.setMinimumSize(new java.awt.Dimension(500, 200));
        DialogNew4.setModal(true);
        DialogNew4.setResizable(false);

        jPanel4.setMinimumSize(new java.awt.Dimension(475, 150));

        CmdNext4.setText("Ok");
        CmdNext4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CmdNext4MouseClicked(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Your journey in our world is about to start...");

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel4.setText("I wish that you will have a wonderful journey");

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel5.setText("And please... Save our World!");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(CmdNext4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE)
                    .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE)
                    .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)
                .addComponent(CmdNext4, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout DialogNew4Layout = new javax.swing.GroupLayout(DialogNew4.getContentPane());
        DialogNew4.getContentPane().setLayout(DialogNew4Layout);
        DialogNew4Layout.setHorizontalGroup(
            DialogNew4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        DialogNew4Layout.setVerticalGroup(
            DialogNew4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Welcome to DMW Adventure 2!");
        setMinimumSize(new java.awt.Dimension(1024, 768));
        setResizable(false);
        addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                formComponentShown(evt);
            }
        });

        jLayeredPane1.setMinimumSize(new java.awt.Dimension(1024, 768));

        BG.setIcon(new javax.swing.ImageIcon(getClass().getResource("/DigimonAdventure/Graphics/kandidat main menu.jpg"))); // NOI18N
        BG.setText("Menguji Icon gambar");
        BG.setMaximumSize(new java.awt.Dimension(1024, 14));
        BG.setPreferredSize(new java.awt.Dimension(2000, 14));
        BG.setBounds(0, 0, 1024, 768);
        jLayeredPane1.add(BG, javax.swing.JLayeredPane.DEFAULT_LAYER);

        cmdCredit.setText("Credit");
        cmdCredit.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cmdCreditMouseClicked(evt);
            }
        });
        cmdCredit.setBounds(410, 450, 200, 45);
        jLayeredPane1.add(cmdCredit, javax.swing.JLayeredPane.PALETTE_LAYER);

        cmdNew.setText("New Game");
        cmdNew.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cmdNewMouseClicked(evt);
            }
        });
        cmdNew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdNewActionPerformed(evt);
            }
        });
        cmdNew.setBounds(410, 310, 200, 45);
        jLayeredPane1.add(cmdNew, javax.swing.JLayeredPane.PALETTE_LAYER);

        cmdLoad.setText("Load Game");
        cmdLoad.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cmdLoadMouseClicked(evt);
            }
        });
        cmdLoad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdLoadActionPerformed(evt);
            }
        });
        cmdLoad.setBounds(410, 380, 200, 45);
        jLayeredPane1.add(cmdLoad, javax.swing.JLayeredPane.PALETTE_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1024, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 768, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void cmdNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdNewActionPerformed
}//GEN-LAST:event_cmdNewActionPerformed

private void cmdNewMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cmdNewMouseClicked
    DigimonAdventure.pemain.setNama("神様\u795E\u69D8");
    DigimonAdventure.pemain.setGender("male");
    DigimonAdventure.pemain.addDigimon(DigimonSpecies.Gnommon);
    DigimonAdventure.pemain.setDigiSeq(1);
    this.setVisible(false);
    bgm.stopMusic();
    DigimonAdventure.eventui.setVisible(true);
    // DialogNew1.setVisible(true); skip dulu buat debug
}//GEN-LAST:event_cmdNewMouseClicked

private void cmdLoadMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cmdLoadMouseClicked
    DialogLoad.setVisible(true);
}//GEN-LAST:event_cmdLoadMouseClicked

private void cmdLoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdLoadActionPerformed
}//GEN-LAST:event_cmdLoadActionPerformed

private void CmdBackMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CmdBackMouseClicked
    DialogCredit.setVisible(false);
}//GEN-LAST:event_CmdBackMouseClicked

private void CmdOKMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CmdOKMouseClicked
    // TODO add your handling code here:
}//GEN-LAST:event_CmdOKMouseClicked

private void CmdCancelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CmdCancelMouseClicked
    DialogLoad.setVisible(false);
}//GEN-LAST:event_CmdCancelMouseClicked

private void CmdNext1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CmdNext1MouseClicked
    if("Myrrh Weisswritter von Artonellic Lune".equals(this.FieldName.getText())){
        DigimonAdventure.pemain.setNama("Myrrh");
        DigimonAdventure.pemain.setGender("Mir");
        bgm.stopMusic();
        DialogNew1.setVisible(false);
        this.setVisible(false);
        DigimonAdventure.event2ui.setVisible(true);
    }else{
        DigimonAdventure.pemain.setNama(FieldName.getText());
        DialogNew1.setVisible(false);
        DialogNew2.setVisible(true);
    }
}//GEN-LAST:event_CmdNext1MouseClicked

private void CmdCancel2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CmdCancel2MouseClicked
    DialogNew1.setVisible(false);
}//GEN-LAST:event_CmdCancel2MouseClicked

private void GenderMMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_GenderMMouseClicked
    //Player.gender = male waktu di-next
}//GEN-LAST:event_GenderMMouseClicked

private void GenderFMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_GenderFMouseClicked
    //Player.gender = female waktu di-next
}//GEN-LAST:event_GenderFMouseClicked

private void CmdNext2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CmdNext2MouseClicked
   
    if (GenderF.isSelected()){
        DigimonAdventure.pemain.setGender("female");
    }else{
        DigimonAdventure.pemain.setGender("male");
    }
    DialogNew2.setVisible(false);
    DialogNew3.setVisible(true);

}//GEN-LAST:event_CmdNext2MouseClicked

private void Digi1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Digi1MouseClicked
    //Pilih bayi digimon 1 (Gnommon) waktu di-next    
}//GEN-LAST:event_Digi1MouseClicked

private void Digi2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Digi2MouseClicked
    //Pilih bayi digimon 2 (Nymphmon) waktu di-next    
}//GEN-LAST:event_Digi2MouseClicked

private void Digi3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Digi3MouseClicked
    //Pilih bayi digimon 3 (Fayrmon) waktu di-next    
}//GEN-LAST:event_Digi3MouseClicked

private void CmdNext3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CmdNext3MouseClicked
    if(Digi1.isSelected()){
        DigimonAdventure.pemain.addDigimon(DigimonSpecies.Gnommon);
        DigimonAdventure.pemain.setDigiSeq(1);
    }else if(Digi2.isSelected()){
        DigimonAdventure.pemain.addDigimon(DigimonSpecies.Nymphmon);
        DigimonAdventure.pemain.setDigiSeq(2);
    }else if(Digi3.isSelected()){
        DigimonAdventure.pemain.addDigimon(DigimonSpecies.Fayrmon);
        DigimonAdventure.pemain.setDigiSeq(3);
    }
    DialogNew3.setVisible(false);
    DialogNew4.setVisible(true);
}//GEN-LAST:event_CmdNext3MouseClicked

private void CmdNext4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CmdNext4MouseClicked
    DialogNew4.setVisible(false);
    this.setVisible(false);
    bgm.stopMusic();
    DigimonAdventure.eventui.setVisible(true);
}//GEN-LAST:event_CmdNext4MouseClicked

private void cmdCreditMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cmdCreditMouseClicked
    DialogCredit.setVisible(true);
}//GEN-LAST:event_cmdCreditMouseClicked

private void jLabel2ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jLabel2ComponentShown
}//GEN-LAST:event_jLabel2ComponentShown

private void DialogNew2ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_DialogNew2ComponentShown
    jLabel2.setText(DigimonAdventure.pemain.getNama() + "... Were you to be reborn, which do you prefer?");
}//GEN-LAST:event_DialogNew2ComponentShown

private void FieldNameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_FieldNameMouseClicked
    FieldName.setText("");
}//GEN-LAST:event_FieldNameMouseClicked

private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown

    new Thread(bgm,"menu-utama-music").start();
}//GEN-LAST:event_formComponentShown

private void CmdNext3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CmdNext3ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_CmdNext3ActionPerformed



    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MenuUtama().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel BG;
    private javax.swing.JButton CmdBack;
    private javax.swing.JButton CmdCancel;
    private javax.swing.JButton CmdCancel2;
    private javax.swing.JButton CmdNext1;
    private javax.swing.JButton CmdNext2;
    private javax.swing.JButton CmdNext3;
    private javax.swing.JButton CmdNext4;
    private javax.swing.JButton CmdOK;
    private javax.swing.JComboBox ComboProfile;
    private javax.swing.JDialog DialogCredit;
    private javax.swing.JDialog DialogLoad;
    private javax.swing.JDialog DialogNew1;
    private javax.swing.JDialog DialogNew2;
    private javax.swing.JDialog DialogNew3;
    private javax.swing.JDialog DialogNew4;
    private javax.swing.JRadioButton Digi1;
    private javax.swing.JRadioButton Digi2;
    private javax.swing.JRadioButton Digi3;
    private javax.swing.ButtonGroup DigimonGroup;
    private javax.swing.JTextField FieldName;
    private javax.swing.JRadioButton GenderF;
    private javax.swing.ButtonGroup GenderGroup;
    private javax.swing.JRadioButton GenderM;
    private javax.swing.JLabel Nama;
    private javax.swing.JButton cmdCredit;
    private javax.swing.JButton cmdLoad;
    private javax.swing.JButton cmdNew;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea jTextArea1;
    // End of variables declaration//GEN-END:variables

}
